package com.kuang.a02threadcase2;

/**
 * @author gs
 * @date 29/5/2024 下午4:35
 */
//1
public class MyRunnable implements Runnable{

    //2
    @Override
    public void run() {
        //这里写线程要执行的方法
        for (int i = 0; i < 100; i++) {
            Thread thread = Thread.currentThread();
            System.out.println(thread.getName() + "-MyRunnable.run() Hi: " + i);
        }
    }
}
